#include "TcpServer.hpp"
#include "Http.hpp"


void Usage(string proc)
{
    cout << "Usage: " << proc<<" + port" << endl;
}
int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        return 1;
    }
    uint16_t port = stoi(argv[1]);
    HttpServer httpservice;
    TcpServer tcpsvr(port, bind(&HttpServer::HandlerHttpRequest, &httpservice, placeholders::_1));
    tcpsvr.Loop();
    

    return 0;
}